// Локальные
#include "geometry/2d/geometry.h"

namespace geometry
{
    namespace _2d
    {
        CORE_EXPORT bool pointInsideTriangle(const Point &A, const Point &B, const Point &C, const Point &Z)
        {
            double s = squareTriangle(A, B, C);
            double s1 = squareTriangle(Z, B, C);
            double s2 = squareTriangle(A, Z, C);
            double s3 = squareTriangle(A, B, Z);

            if(qAbs(s - s1 - s2 - s3) < DBL_EPSILON)
                return true;
            else
                return false;
        }
    }
}
